import Vue from 'vue'
import Vuex from 'vuex'

import * as actions from './actions'
import * as getters from './getters'
import * as mutations from './mutations'

Vue.use(Vuex)

export const store = new Vuex.Store({
  //设置属性
  state: {
    menuItems: {},
    currentUser: null,
    isLogin: false
  },

  //方法，获取属性的状态
  getters,

  //改变属性的状态
  mutations,

  //应用mutations
  actions
})
